import pytest

from page.mp_login_page import LoginPage


@pytest.fixture(params=[('13911111111','246810')], ids=['test01'])
def login_data(request):
    return request.param

class TestLoginPage(object):

    @pytest.fixture(scope='function')
    def setup_teardown(self):
        self.login_page_obj = LoginPage()
        self.login_page_obj.driver.get('http://pc-toutiao-python.itheima.net/#/login')
        yield
        self.login_page_obj.driver_quit()

    def test_login(self,setup_teardown, login_data):
        print(login_data)
        self.login_page_obj.login_page(login_data[0],login_data[1])



